package com.mes.biz.domain;

import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseTreeEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;

/**
 * 产品分类对象 biz_product_category
 * @author hwg
 * @email hwg
 * @date 2023-04-16
 */
@Data
public class BizProductCategory extends BaseTreeEntity<BizProductCategory>
{
    private static final long serialVersionUID = 1L;

    /** 分类名称 */
    @Excel(name = "分类名称")
    @NotBlank(message = "分类名称不允许为空")
    @LogField
    @FieldRemark(name = "分类名称",field = "categoryName")
    private String categoryName;

    /** 分类类型1原料2下单料3辅料4余料 */
    @Excel(name = "分类类型", dictType = "biz_product_category_type")
    @NotBlank(message = "分类类型不允许为空")
    private String categoryType;

    /** 租户id */
    private String tenantId;

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setCategoryType(String categoryType)
    {
        this.categoryType = categoryType;
    }

    public String getCategoryType()
    {
        return categoryType;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("categoryName", getCategoryName())
            .append("treeSort", getTreeSort())
            .append("categoryType", getCategoryType())
            .append("parentIds", getParentIds())
            .append("treeSorts", getTreeSorts())
            .append("treeLevel", getTreeLevel())
            .append("treeLeaf", getTreeLeaf())
            .append("tenantId", getTenantId())
            .append("remark", getRemark())
            .append("id", getId())
            .append("parentId", getParentId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
